package cn.xiaoke.damowang_boot_test.domain;

import cn.xiaoke.damowang_boot_test.domain.interfac.Lucky;
import cn.xiaoke.damowang_boot_test.domain.interfac.User;
import cn.xiaoke.damowang_boot_test.entity.LuckUser;
import cn.xiaoke.damowang_boot_test.entity.LuckyDraw;
import org.springframework.beans.BeanUtils;

public class Factory {

    public static User getUserInstance(LuckUser user){

        if (user.getVipLevel().equals(0)){
            final CommonVip commonVip = new CommonVip();
            BeanUtils.copyProperties(user,commonVip);
            return commonVip;
        }else if (user.getVipLevel().equals(1)){

        }else {

        }
        return null;
    }

    public static Lucky getLuckyInstance(LuckyDraw luckyDraw){

        return null;
    }

}
